<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增模板内容')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-detail-add">
            <input id="templateId" name="templateId" th:value="${templateId}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">文本：</label>
                    <div class="col-sm-8">
                        <textarea name="text" class="form-control"></textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">语速（0.5-2）：</label>
                    <div class="col-sm-8">
                        <textarea name="speechRate" class="form-control"></textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">顺序：</label>
                    <div class="col-sm-8">
                        <input name="level" class="form-control" type="number">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">同句标识：</label>
                    <div class="col-sm-8">
                        <input name="uniqueNo" class="form-control" type="uniqueNo">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否有变量：</label>
                <div class="col-sm-8">
                    <select class="type form-control m-b" name="isDefault">
                        <option value="1">无</option>
                        <option value="0">有</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "video/detail"
        $("#form-detail-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-detail-add').serialize());
            }
        }
    </script>
</body>
</html>